package com.fowo.api.documentCirculation.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
import java.util.Map;

/**
 * 下推、勾稽请求
 * @author yl_ls
 */
@Getter
@Setter
@Accessors(chain = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class PushDownRequestPo {
    /**
     * 任务编号
     */
    private Long dataTaskId;

    /**
     * 指定目标主键，适用于勾稽
     */
    private Long toMainId;

    /**
     * 数据体
     */
    private List<PushDownEntity> entities;


    @Getter
    @Setter
    @Accessors(chain = true)
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public static class PushDownEntity {
        /**
         * 来源数据
         */
        private Map<String, Object> fromMap;
        /**
         * 目标数据
         */
        private Map<String, Object> toMap;
        /**
         * 下级数据
         */
        private List<PushDownEntity> children;
    }
}
